<template>
  <div>
    <h1>雇主确认列表页</h1>
    <el-table :data="lst" border style="width: 100%">
      <el-table-column fixed prop="title" label="标题" width="150">
      </el-table-column>
      <el-table-column fixed prop="code" label="code码" width="150">
      </el-table-column>
      <el-table-column prop="need_type" label="类型" width="350">
      </el-table-column>
      <el-table-column prop="price" label="金额" width="120"> </el-table-column>
      <el-table-column prop="cateid" label="类型id" width="120">
      </el-table-column>
      <el-table-column fixed="right" label="操作" width="100">
        <template slot-scope="scope">
          <el-button @click="submit(scope.row.code,scope.row.price)" type="text" size="small"
            >通过</el-button
          >
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  data() {
    return {
      lst: [],
      userid: localStorage.getItem("userid"),
    };
  },
  methods: {
    getdata() {
      this.axios.get("/guzhuqueren?userid=" + this.userid).then((res) => {
        console.log(res);
        this.lst = res.data.data;
      });
    },
    submit(code,price){
        this.axios.get('/pass1?code='+code+'&money='+price+'&userid='+this.userid).then(res=>{
            console.log(res)
            alert(res.data.msg)
        })
    }
  },
  mounted() {
    this.getdata();
  },
};
</script>

<style>
</style>